package com.qnbc.mystery.pojo.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * 用户信息
 *
 * @author
 * @since 2022-01-26
 */
@Getter
@Setter
@TableName("sys_user")
@ApiModel(value = "User对象", description = "")
@ToString
public class User implements Serializable {

	private static final long serialVersionUID = 1L;

	@ApiModelProperty("id")
	@TableId(value = "id", type = IdType.AUTO)
	private Integer id;

	@ApiModelProperty("用户名")
	private String username;

	@ApiModelProperty("密码")
	private String password;

	@ApiModelProperty("昵称")
	private String nickname;

	@ApiModelProperty("性别 1男 2 女")
	private String sex;

	@ApiModelProperty("电话")
	private String phone;

	@ApiModelProperty("地址")
	private String address;

	@JsonFormat(pattern = "yyyy-mm-dd HH:ss:mm")
	@ApiModelProperty("创建时间")
	private Date createTime;

	@ApiModelProperty("头像")
	private String avatarUrl;

	@ApiModelProperty("角色")
	private String role;

	@ApiModelProperty("微信唯一标识")
	private String openId;

	/**
	 * 微信头像
	 */
	@ApiModelProperty(name = "微信头像", notes = "")
	private String wechatAvatar;

	/**
	 * 默认地址
	 */
	@ApiModelProperty(name = "默认地址", notes = "")
	@TableField(exist = false)
	private Address userDefaultAddress;

}
